<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/pc/jsp/common/common.jsp"%>
<%@ page language="java" import="com.limao.DBDataClass.AdvDataClass"%>
<%@ page language="java" import="com.limao.DBDataClass.SysProjectCateDataClass"%>
<%@ page language="java" import="com.limao.DBDataClass.CrowdHomeCommendClass"%>
<%@ page language="java" import="com.limao.DBDataClass.CrowdSysProjectClass"%>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
    <title>首页</title>
    <link rel="stylesheet" href="pc/css/all3.css" />
	<script src="pc/js/jquery.touchSlider.js"></script>
	<script>
		$(window).load(function() {
		
			headertabcurrent=1;
			$("#header").load("pc/header.jsp"); 
			$("#footer").load("pc/footer.jsp"); 
			
			//headerTab(1);
		});
	</script>
	
    <script type="text/javascript">
        $(function(){
        
        //限制字符个数
		$(".proName>span").each(function(){
			var maxwidth=16;
			if($(this).text().length>maxwidth){
			$(this).text($(this).text().substring(0,maxwidth));
			$(this).html($(this).html()+"...");
			}
		});
          
        $(".proTittle>div>span").each(function(){
        	if($(this).text()=="热销"){
			   $(this).addClass("red");
			}else if($(this).text()=="推荐"){
			   $(this).addClass("blue");
			}
		});

        
//            图片滑动
            $(".main_visual").hover(function(){
                $("#btn_prev,#btn_next").fadeIn();
            },function(){
                $("#btn_prev,#btn_next").fadeOut();
            });

            $dragBln = false;

            $(".main_image").touchSlider({
                flexible : true,
                speed : 1000,
                btn_prev : $("#btn_prev"),
                btn_next : $("#btn_next"),
                paging : $(".flicking_con a"),
                counter : function (e){
                    $(".flicking_con a").removeClass("on").eq(e.current-1).addClass("on");
                }
            });

            $(".main_image").bind("mousedown", function() {
                $dragBln = false;
            });

            $(".main_image").bind("dragstart", function() {
                $dragBln = true;
            });

            $(".main_image a").click(function(){
                if($dragBln) {
                    return false;
                }
            });

            timer = setInterval(function(){
                $("#btn_next").click();
            }, 3500);

            $(".main_visual").hover(function(){
                clearInterval(timer);
            },function(){
                timer = setInterval(function(){
                    $("#btn_next").click();
                },3500);
            });

            $(".main_image").bind("touchstart",function(){
                clearInterval(timer);
            }).bind("touchend", function(){
                timer = setInterval(function(){
                    $("#btn_next").click();
                }, 3500);
            });

            //            进度条
            $(".bar_span").each(function () {
                var ress = $(this).attr('width');
                var len=ress+"%";
                //console.log(len);
                $(this).animate({
                    width:len
                });

            });


        });
        
        

    </script>
    
    <script>
        if ($.browser.msie && $.browser.version <= 10.0)
        {
            layer.alert( "很抱歉，您的浏览器版本过低，网站功能支持较低，请您用IE11.0以上的浏览器或者其他浏览器浏览网页，推荐使用360（极速）浏览器;推荐使用谷歌浏览器");
            window.location.href=baseUrl+"pc/browserRecommend.jsp";
            $(".theme-popover-mask").fadeIn();
        }

    </script>
</head>
<body  ontouchstart="">
   <!--header-->
	<div  id="header"> </div>
	
	<!--广告-->
	<%	List<AdvDataClass> advList =WebFunction.getHomeAdv(); %>
    <div class="w100 of clearfix">
    
    <div class="w100">
    <div class="main_visual w100">
    <div class="flicking_con">
    <div class="jz">
        <% int index=1; for (AdvDataClass obj:advList){%>
    	<a href=""><%=index%></a>
    	<%} %>
    </div>
    </div>
    <div class="main_image">
    <ul>
        <%for (AdvDataClass obj:advList){ %>
    <li>
    <%if(CacheClass.getIntValue(obj.type)==0){ %>
    <a href="<%=obj.weburl%>"><img src="<%=(imgPath+obj.imgurl)%>" class="db w100 h100"></a>
    <%}else{ %>
    <a href="pc/productDetail.jsp?projectid=<%=obj.weburl%>"><img src="<%=(imgPath+obj.imgurl)%>" class="db w100 h100"></a>
    <%} %>
    </li>
        <% } %>
    </ul>
    <a href="javascript:;" id="btn_prev"></a>
    <a href="javascript:;" id="btn_next"></a>
    </div>
    </div>
    </div>
    
    </div>

    <div class="container jz">
         <!--导航条-->
   		 <%  List<SysProjectCateDataClass> CateList= WebFunction.getProjectCate();  %>
         <div  class="nav w100">
            <div class="w100 clearfix of">
            
               <%index=1; for(SysProjectCateDataClass tmp:CateList){if(index>8) break; %>
                <a href="pc/zhongChouList.jsp?cateid=<%=tmp.cateid%>">
                    <img src="<%=(imgPath+tmp.cateimage)%>" class="navImg keji">
                    <span><%=tmp.catename%></span>
                </a>
                <%index++; } %>
            </div>
        </div>
        <!--首页推荐-->  
       <%  List<CrowdHomeCommendClass> CommendList= WebFunction.getHomeCommend();  %> 
       <!--首页推荐 1-->  
       <%index=1; for(CrowdHomeCommendClass commend:CommendList){%>
        <div class="floorBlock w100 of">
            <div class="tittle w100 clearfix of">
                <div class="fl">
                    <span class="floorNum f18 dib tc ffa fb"><%=index%>F</span><span class="c6 fw300" style="font-size: 28px;margin-left: 35px;"><%=commend.catename %></span><img src="images/sanjiao.png" class="dib mgl10">
                </div>
                <div class="fr">
                    <a href="pc/zhongChouList.jsp?cateid=<%=commend.cateid%>" class="c6 f14">
                        更多 >>
                    </a>
                </div>
            </div>

            <div class="separateLine w100 of">
                <div class="w100"></div>
                <div class="w100" style="background: #fff"></div>
            </div><!--separateLine-->
            
            
         <% List<CrowdSysProjectClass> childlist=commend.childlist; 
            int endIndex=childlist.size(); CrowdSysProjectClass pro=null;%>
              <!-- 大图 第一个 最外层div开始-->
             <%if(endIndex>0){ pro=childlist.get(0); 
             int stocknum=0; 
             if((CacheClass.getIntValue(pro.limitenum)-CacheClass.getIntValue(pro.supportnum))>0)
             {
             	stocknum=CacheClass.getIntValue(pro.limitenum)-CacheClass.getIntValue(pro.supportnum);
             }
             
          %> 
            <div class="w100 of" style="padding-bottom: 10px">
                <div class="contentLeft fl of">
                    <div class="proSection pr w100 bcf" onclick="toLocation('pc/productDetail.jsp?projectid=<%=pro.projectid %>')">
                        <div class="proTittle pa w100">
                            <div class="of clearfix w100">
                                <span class="fl"><%=pro.stateAbout%></span>
                                <!--<a href="#" class="fr">科技</a>-->
                            </div>
                        </div>
                        <a class="proImg db w100 of pr">
                            <img src="<%=(imgPath+pro.projectimage.split(";")[0]+pc_home_1)%>" class="db w100 h100">
                              <div class="pa f16 cf tc soldOut">已售<%=pro.supportnum%></div>
                        </a>
                        <a class="proName db of clearfix">
                            <span class="fl"><%=pro.projectname%></span>
                            <i class="fr"><%=pro.companyname%></i>
                        </a>
                        <a class="progress db"><div class="bar_span" width="100%"></div></a>
                        <a class="proDetail db of clearfix">
                            <div class="fl tl" style="width: 48%">
                                <span class="db f17">￥<%=pro.packagepriceAbout%></span>
                                <i class="db f14">价格</i>
                            </div>
                            <div class="fl tl" style="width: 38%">
                                <span class="db f17"><%=stocknum%></span>
                                <i class="db f14">库存</i>
                            </div>
                            <div class="fl tl" style="width: 14%">
                                <span class="db f17"><%=pro.days%>&nbsp;天</span>
                                <i class="db f13">送vip</i>
                            </div>
                        </a>
                    </div> <!--proSection-->
                </div>
                <%} %>
                <!-- 大图 右侧2个 -->
 				
                <div class="contentRight2 fr">
                   <%if(endIndex>1){ pro=childlist.get(1);
                     int stocknum=0; 
		             if((CacheClass.getIntValue(pro.limitenum)-CacheClass.getIntValue(pro.supportnum))>0)
		             {
		             	stocknum=CacheClass.getIntValue(pro.limitenum)-CacheClass.getIntValue(pro.supportnum);
		             }
                   
                   %>
                    <div class="contentLittle w100 of clearfix">
                        <div class="proSection pr w100 bcf" onclick="toLocation('pc/productDetail.jsp?projectid=<%=pro.projectid %>')">
                            <div class="proTittle pa w100">
                                <div class="of clearfix w100">
                                    <span class="fl"><%=pro.stateAbout%></span>
                                </div>
                            </div>
                            <a class="proImg db w100 of pr">
                                <img src="<%=(imgPath+pro.projectimage.split(";")[0]+pc_alllist)%>" class="db w100 h100">
                                <div class="pa f16 cf tc soldOut">已售<%=pro.supportnum%></div>
                            </a>
	                        <a class="proName db of clearfix">
	                            <span class="fl"><%=pro.projectname%></span>
	                        </a>
                            <a class="progress db"><div class="bar_span" width="100%"></div></a>
                            <a class="proDetail db of clearfix">
                                <div class="fl tl" style="width: 46%">
                                    <span class="db f13">￥<%=pro.packagepriceAbout%></span>
                                    <i class="db f12">价格</i>
                                </div>
                                <div class="fl tl" style="width: 40%">
                                    <span class="db f13"><%=stocknum%></span>
                                    <i class="db f12">库存</i>
                                </div>
                                <div class="fl tl" style="width: 14%">
                                    <span class="db f13"><%=pro.days%>&nbsp;天</span>
                                    <i class="db f12">送vip</i>
                                </div>
                            </a>
                        </div> <!--proSection-->
                 <%} %>      
                 <%if(endIndex>2){ pro=childlist.get(2);
                     int stocknum=0; 
		             if((CacheClass.getIntValue(pro.limitenum)-CacheClass.getIntValue(pro.supportnum))>0)
		             {
		             	stocknum=CacheClass.getIntValue(pro.limitenum)-CacheClass.getIntValue(pro.supportnum);
		             }
                 %> 
                        
                        <div class="proSection pr w100 bcf mgl16" onclick="toLocation('pc/productDetail.jsp?projectid=<%=pro.projectid %>')">
                            <div class="proTittle pa w100">
                                <div class="of clearfix w100">
                                    <span class="fl"><%=pro.stateAbout%></span>
                                </div>
                            </div>
                            <a class="proImg db w100 of pr">
                                <img src="<%=(imgPath+pro.projectimage.split(";")[0]+pc_alllist)%>" class="db w100 h100">
                                 <div class="pa f16 cf tc soldOut">已售<%=pro.supportnum%></div>
                            </a>
                            <a class="proName db of clearfix">
                            	<span class="fl"><%=pro.projectname%></span>
                        	</a>
                            <a class="progress db"><div class="bar_span" width="100%"></div></a>
                            <a class="proDetail db of clearfix">
                                <div class="fl tl" style="width: 46%">
                                    <span class="db f13">￥<%=pro.packagepriceAbout%></span>
                                    <i class="db f12">价格</i>
                                </div>
                                <div class="fl tl" style="width: 40%">
                                    <span class="db f13"><%=stocknum%></span>
                                    <i class="db f12">库存</i>
                                </div>
                                <div class="fl tl" style="width: 14%">
                                    <span class="db f13"><%=pro.days%>&nbsp;天</span>
                                    <i class="db f12">送vip</i>
                                </div>
                            </a>
                        </div> <!--proSection-->
                    <%} %> 
                    </div>
                    
                    
                    
                    
                    
                    <div class="contentLittle w100 of clearfix">
                    	<%if(endIndex>3){ pro=childlist.get(3);
                    	     int stocknum=0; 
				             if((CacheClass.getIntValue(pro.limitenum)-CacheClass.getIntValue(pro.supportnum))>0)
				             {
				             	stocknum=CacheClass.getIntValue(pro.limitenum)-CacheClass.getIntValue(pro.supportnum);
				             }
                    	%>
                        <div class="proSection pr w100 bcf" onclick="toLocation('pc/productDetail.jsp?projectid=<%=pro.projectid %>')">
                            <div class="proTittle pa w100">
                                <div class="of clearfix w100">
                                    <span class="fl"><%=pro.stateAbout%></span>
                                </div>
                            </div>
                            <a  class="proImg db w100 of pr">
                                <img src="<%=(imgPath+pro.projectimage.split(";")[0]+pc_alllist)%>" class="db w100 h100">
                                 <div class="pa f16 cf tc soldOut">已售<%=pro.supportnum%></div>
                            </a>
                            <a class="proName db of clearfix">
                            	<span class="fl"><%=pro.projectname%></span>
                        	</a>
                            <a class="progress db"><div class="bar_span" width="100%"></div></a>
                            <a class="proDetail db of clearfix">
                                <div class="fl tl" style="width: 46%">
                                    <span class="db f13">￥<%=pro.packagepriceAbout%></span>
                                    <i class="db f12">价格</i>
                                </div>
                                <div class="fl tl" style="width: 40%">
                                    <span class="db f13"><%=stocknum%></span>
                                    <i class="db f12">库存</i>
                                </div>
                                <div class="fl tl" style="width: 14%">
                                    <span class="db f13"><%=pro.days%>&nbsp;天</span>
                                    <i class="db f12">送vip</i>
                                </div>
                            </a>
                        </div> <!--proSection-->
                       <%} %>
                      
                      <%if(endIndex>4){ pro=childlist.get(4);
                             int stocknum=0; 
				             if((CacheClass.getIntValue(pro.limitenum)-CacheClass.getIntValue(pro.supportnum))>0)
				             {
				             	stocknum=CacheClass.getIntValue(pro.limitenum)-CacheClass.getIntValue(pro.supportnum);
				             }
                      %>
                        <div class="proSection pr w100 bcf mgl16" onclick="toLocation('pc/productDetail.jsp?projectid=<%=pro.projectid %>')">
                            <div class="proTittle pa w100">
                                <div class="of clearfix w100">
                                    <span class="fl"><%=pro.stateAbout%></span>
                                </div>
                            </div>
                            <a  class="proImg db w100 of pr">
                                <img src="<%=(imgPath+pro.projectimage.split(";")[0]+pc_alllist)%>" class="db w100 h100">
                                 <div class="pa f16 cf tc soldOut">已售<%=pro.supportnum%></div>
                            </a>
                            <a class="proName db of clearfix">
                            	<span class="fl"><%=pro.projectname%></span>
                        	</a>
                            <a class="progress db"><div class="bar_span" width="100%"></div></a>
                            <a class="proDetail db of clearfix">
                                <div class="fl tl" style="width: 46%">
                                    <span class="db f13">￥<%=pro.packagepriceAbout%></span>
                                    <i class="db f12">价格</i>
                                </div>
                                <div class="fl tl" style="width: 40%">
                                    <span class="db f13"><%=stocknum%></span>
                                    <i class="db f12">库存</i>
                                </div>
                                <div class="fl tl" style="width: 14%">
                                    <span class="db f13"><%=pro.days%>&nbsp;天</span>
                                    <i class="db f12">送vip</i>
                                </div>
                            </a>
                        </div> <!--proSection-->
                       <%} %>
                    </div>
                </div>

            </div>

   			
            <!-- 四个小图  开始-->
            <div class="contentLittle w100 of clearfix" >
               <%if(endIndex>5){ pro=childlist.get(5);
                       int stocknum=0; 
				       if((CacheClass.getIntValue(pro.limitenum)-CacheClass.getIntValue(pro.supportnum))>0)
				       {
				          stocknum=CacheClass.getIntValue(pro.limitenum)-CacheClass.getIntValue(pro.supportnum);
				       }
               %>
                <div class="proSection pr w100 bcf" onclick="toLocation('pc/productDetail.jsp?projectid=<%=pro.projectid %>')">
                    <div class="proTittle pa w100">
                        <div class="of clearfix w100">
                            <span class="fl"><%=pro.stateAbout%></span>
                        </div>
                    </div>
                    <a  class="proImg db w100 of pr">
                        <img src="<%=(imgPath+pro.projectimage.split(";")[0]+pc_alllist)%>" class="db w100 h100">
                         <div class="pa f16 cf tc soldOut">已售<%=pro.supportnum%></div>
                    </a>
                            <a class="proName db of clearfix">
                            	<span class="fl"><%=pro.projectname%></span>
                        	</a>
                    <a class="progress db"><div class="bar_span" width="100%"></div></a>
                    <a class="proDetail db of clearfix">
                        <div class="fl tl" style="width: 46%">
                            <span class="db f13">￥<%=pro.packagepriceAbout%></span>
                            <i class="db f12">价格</i>
                        </div>
                        <div class="fl tl" style="width: 40%">
                            <span class="db f13"><%=stocknum%></span>
                            <i class="db f12">库存</i>
                        </div>
                        <div class="fl tl" style="width: 14%">
                            <span class="db f13"><%=pro.days%>&nbsp;天</span>
                            <i class="db f12">送vip</i>
                        </div>
                    </a>
                </div> <!--proSection-->
                <%} %>
                <%if(endIndex>6){ pro=childlist.get(6);
                      int stocknum=0; 
				       if((CacheClass.getIntValue(pro.limitenum)-CacheClass.getIntValue(pro.supportnum))>0)
				       {
				          stocknum=CacheClass.getIntValue(pro.limitenum)-CacheClass.getIntValue(pro.supportnum);
				       }                
                %>
                <div class="proSection pr w100 bcf mgl16" onclick="toLocation('pc/productDetail.jsp?projectid=<%=pro.projectid %>')">
                    <div class="proTittle pa w100">
                        <div class="of clearfix w100">
                            <span class="fl"><%=pro.stateAbout%></span>
                        </div>
                    </div>
                    <a class="proImg db w100 of pr">
                        <img src="<%=(imgPath+pro.projectimage.split(";")[0]+pc_alllist)%>" class="db w100 h100">
                         <div class="pa f16 cf tc soldOut">已售<%=pro.supportnum%></div>
                    </a>
                            <a class="proName db of clearfix">
                            	<span class="fl"><%=pro.projectname%></span>
                        	</a>
                    <a class="progress db"><div class="bar_span" width="100%"></div></a>
                    <a class="proDetail db of clearfix">
                        <div class="fl tl" style="width: 46%">
                            <span class="db f13">￥<%=pro.packagepriceAbout%></span>
                            <i class="db f12">价格</i>
                        </div>
                        <div class="fl tl" style="width: 40%">
                            <span class="db f13"><%=stocknum%></span>
                            <i class="db f12">库存</i>
                        </div>
                        <div class="fl tl" style="width: 14%">
                            <span class="db f13"><%=pro.days%>&nbsp;天</span>
                            <i class="db f12">送vip</i>
                        </div>
                    </a>
                </div> <!--proSection-->
                <%} %>
                <%if(endIndex>7){ pro=childlist.get(7);
                       int stocknum=0; 
				       if((CacheClass.getIntValue(pro.limitenum)-CacheClass.getIntValue(pro.supportnum))>0)
				       {
				          stocknum=CacheClass.getIntValue(pro.limitenum)-CacheClass.getIntValue(pro.supportnum);
				       }                
                %>
                <div class="proSection pr w100 bcf mgl16" onclick="toLocation('pc/productDetail.jsp?projectid=<%=pro.projectid %>')">
                    <div class="proTittle pa w100">
                        <div class="of clearfix w100">
                            <span class="fl"><%=pro.stateAbout%></span>
                        </div>
                    </div>
                    <a class="proImg db w100 of pr">
                        <img src="<%=(imgPath+pro.projectimage.split(";")[0]+pc_alllist)%>" class="db w100 h100">
                         <div class="pa f16 cf tc soldOut">已售<%=pro.supportnum%></div>
                    </a>
                            <a class="proName db of clearfix">
                            	<span class="fl"><%=pro.projectname%></span>
                        	</a>
                    <a class="progress db"><div class="bar_span" width="100%"></div></a>
                    <a class="proDetail db of clearfix">
                        <div class="fl tl" style="width: 46%">
                            <span class="db f13">￥<%=pro.packagepriceAbout%></span>
                            <i class="db f12">价格</i>
                        </div>
                        <div class="fl tl" style="width: 40%">
                            <span class="db f13"><%=stocknum%></span>
                            <i class="db f12">库存</i>
                        </div>
                        <div class="fl tl" style="width: 14%">
                            <span class="db f13"><%=pro.days%>&nbsp;天</span>
                            <i class="db f12">送vip</i>
                        </div>
                    </a>
                </div> <!--proSection-->
                <%} %>
                <%if(endIndex>8){ pro=childlist.get(8);
                       int stocknum=0; 
				       if((CacheClass.getIntValue(pro.limitenum)-CacheClass.getIntValue(pro.supportnum))>0)
				       {
				          stocknum=CacheClass.getIntValue(pro.limitenum)-CacheClass.getIntValue(pro.supportnum);
				       }                
                %>
                <div class="proSection pr w100 bcf mgl16" onclick="toLocation('pc/productDetail.jsp?projectid=<%=pro.projectid %>')">
                    <div class="proTittle pa w100">
                        <div class="of clearfix w100">
                            <span class="fl"><%=pro.stateAbout%></span>
                        </div>
                    </div>
                    <a class="proImg db w100 of pr">
                        <img src="<%=(imgPath+pro.projectimage.split(";")[0]+pc_alllist)%>" class="db w100 h100">
                    </a>
                            <a class="proName db of clearfix">
                            	<span class="fl"><%=pro.projectname%></span>
                        	</a>
                    <a class="progress db"><div class="bar_span" width="100%"></div></a>
                    <a class="proDetail db of clearfix">
                        <div class="fl tl" style="width: 46%">
                            <span class="db f13">￥<%=pro.packagepriceAbout%></span>
                            <i class="db f12">价格</i>
                        </div>
                        <div class="fl tl" style="width: 40%">
                            <span class="db f13"><%=stocknum%></span>
                            <i class="db f12">库存</i>
                        </div>
                        <div class="fl tl" style="width: 14%">
                            <span class="db f13"><%=pro.days%>&nbsp;天</span>
                            <i class="db f12">送vip</i>
                        </div>
                    </a>
                </div> <!--proSection-->
				<%} %>
            </div>

         </div><!--floorBlock-->
          <% index++; %>
       <%} %>    
       
    </div><!--container-->


	<!--footer-->
    <div id="footer" class="footer w100 of"> </div>
    <div class="pf bcf" style="width: 136px;right: 3%;top:30%;z-index: 10;border: 1px solid #ddd;opacity: 0.9;">
        <img src="pc/images/qrCode-index.png" class="db jz hauto mgt10" style="width: 90%"/>
        <p class="tc f14 mgt10">手机APP下载</p>
        <p class="mgt10"></p>
    </div>
<!--loginIframeDiv-->


<script>
    //            IE圆角
    if (window.PIE) {
        $('.rounded,.flicking_con a,.proSection .bar_span,.proSection .progress,.blueBtn,.yuanjiao,.br3,.br6,.br50').each(function() {
            PIE.attach(this);
        });
    }
</script>
</body>
</html>